export default defineNuxtConfig({
    compatibilityDate: "2025-01-10",
    devtools: { enabled: true },
    modules: [
        "@nuxtjs/tailwindcss",
        "@nuxtjs/i18n",
        "@element-plus/nuxt",
        "@nuxt/image",
        "nuxt3-aos",
    ],
    i18n: {
        vueI18n: "../lang/i18n.config.js",
        detectBrowserLanguage: {
            useCookie: true,
        },
    },
    css: ["@/assets/style/main.css"],
    image: {
        format: ["webp, png, jpg"],
        dir: "assets/",
    },
    nitro: {
        output: {
            dir: ".output_waterwood_hk",
        },
    },
    devServer: {
        host: "http://192.168.10.37",
        port: 3000,
    },
    postcss: {
        plugins: {
            tailwindcss: {},
            autoprefixer: {},
            "postcss-pxtorem": {
                rootValue: 16, // 基准
                propList: ["*"], // 需要转换的属性
                unitPrecision: 5, // 保留小数位数
                exclude: /node_modules/i,
            },
        },
    },
    plugins: [{ src: "~/plugins/router-interceptor.js", mode: "client" }],
});
